awk or sed: Best way to grab [this text]
Posted
by Parand
on Stack Overflow
See other posts from Stack Overflow
or by Parand
Published on 2009-04-17T08:05:04Z
Indexed on
2010/03/17
8:41 UTC
Read the original article
Hit count: 244
I'm trying to parse various info from log files, some of which is placed within square brackets. For example:
Tue, 06 Nov 2007 10:04:11 INFO processor:receive: [someuserid], [somemessage] msgtype=[T]
What's an elegant way to grab 'someuserid' from these lines, using sed, awk, or other unix utility?
© Stack Overflow or respective owner